<template>
  <div>
    <!-- 头部 -->
    <div class="dark-top">
      <a @click="goback" class="page-back"><div></div></a>
      <div class="page-title">
        <font style="vertical-align: inherit;">设置</font>
      </div>
    </div>
    <!-- 列表 -->
    <div class="dark-body">
      <div class="dark-user" @click="goSaveUserInfo">
        <p>修改个人信息</p>
      </div>
      <div class="dark-user" @click="goConsultUserInfo"><p>商城认证</p></div>
      <div class="dark-user" @click="goAgreement"><p>协议</p></div>
    </div>

    <!-- 确认按钮 -->
    <div class="release-button" @click="cancellationLogin">注销登录</div>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  methods: {
    goback() {
      this.$router.go(-1);
    },
    goSaveUserInfo() {
      //到 修改头像
      this.$router.push({
        name: "MyInfor"
      });
    },
    goConsultUserInfo() {
      //到 商城认证页面
      this.$router.push({
        name: "ConsultApprove"
      });
    },
    goAgreement() {
      //到 协议
      this.$router.push({
        name: "Agreement"
      });
    },
    cancellationLogin() {
      //注销
      this.$store.commit("$_setLogin", 0);
      this.$store.commit("setToken", 0);
      this.$router.push({
        name: "Login"
      });
    }
  }
};
</script>

<style lang="scss" scoped>
//头部
.dark-top {
  width: 100%;
  height: 2.75rem;
  color: #1a1a1a;
  position: relative;

  /* 设置渐变 */
  background: rgb(255, 0, 0); /* Old browsers */
  background: -moz-linear-gradient(
    to right bottom,
    rgb(255, 127, 95) 10%,
    rgb(229, 39, 77) 70%
  ); /* FF3.6-15 */
  background: -webkit-linear-gradient(
    to right bottom,
    rgb(255, 127, 95) 10%,
    rgb(229, 39, 77) 70%
  ); /* Chrome10-25,Safari5.1-6 */
  background: linear-gradient(
    to right bottom,
    rgb(255, 127, 95) 10%,
    rgb(229, 39, 77) 70%
  ); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ff0000', endColorstr='#ffffff',GradientType=0 ); /* IE6-9 */

  .page-back {
    width: 0.5625rem;
    height: 0.9375rem;
    text-decoration: none;
    color: #1a1a1a;
    display: inline-block;
    position: absolute;
    left: 0.9375rem;
    top: 1.0625rem;

    :first-child {
      width: 100%;
      height: 100%;
      background-image: url(../../assets/login/return-white.png);
      background-repeat: no-repeat;
      background-size: contain;
      background-position: center;
      overflow: hidden;
    }
  }

  .page-title {
    font-size: 1.125rem;
    color: #ffffff;
    display: inline-block;
    position: absolute;
    left: 50%;
    top: 0.65rem;
    -ms-transform: translateX(-50%) translateY(0); /* IE 9 */
    -moz-transform: translateX(-50%) translateY(0); /* Firefox */
    -webkit-transform: translateX(-50%) translateY(0); /* Safari 和 Chrome */
    -o-transform: translateX(-50%) translateY(0); /* Opera */
  }
}

//列表
.dark-body {
  width: 21.5625rem;
  margin: auto;

  .dark-user {
    width: 100%;
    height: 3.125rem;
    box-shadow: 0 0 0.0625rem rgba(0, 0, 0, 0.05);
    margin-top: 0.9375rem;
    cursor: pointer;
    p {
      font-size: 0.9375rem;
      color: #333333;
      line-height: 3.125rem;
      padding-left: 0.625rem;
    }
  }
}

//确认按钮
.release-button {
  margin: 3.125rem auto 0;
  width: 21.5625rem;
  height: 3.0625rem;
  border-radius: 1.5625rem;
  font-size: 1.125rem;
  color: #ffffff;
  text-align: center;
  line-height: 3.0625rem;

  /* 设置渐变 */
  background: rgb(255, 0, 0); /* Old browsers */
  background: -moz-linear-gradient(
    to right bottom,
    rgb(255, 127, 95) 10%,
    rgb(229, 39, 77) 70%
  ); /* FF3.6-15 */
  background: -webkit-linear-gradient(
    to right bottom,
    rgb(255, 127, 95) 10%,
    rgb(229, 39, 77) 70%
  ); /* Chrome10-25,Safari5.1-6 */
  background: linear-gradient(
    to right bottom,
    rgb(255, 127, 95) 30%,
    rgb(229, 39, 77) 80%
  ); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ff0000', endColorstr='#ffffff',GradientType=0 ); /* IE6-9 */
}
</style>
